package aparicio.mbox.parse;

import static org.junit.Assert.*;

import org.junit.Test;

public class SentEmailTestCase {

	@Test
	public void testParseSentEmail() {
		String file = "test\\aparicio\\mbox\\parse\\mbox_good.mbox";
		MboxFile mbox = new MboxFile(file);
		
		try {
			mbox.parse();
		} catch (Exception e) {
			e.printStackTrace();
			fail("Failed to correctly parse the emails");
		}
		
		assertEquals(2, mbox.getSentEmail().size());
		assertEquals("<MileagePlus@news.united.com>", mbox.getSentEmail().get(0));
		assertEquals("<promo@e.newegg.com>", mbox.getSentEmail().get(1));
	}

}
